Virtual Desktop Infrastructure (VDI) refers to a system of providing complete centrally-managed desktops to users using computer virtualization technology. VDI is used to create a large number of independent computing environments for a large number of users. The desktop users may be grouped together based on similar software and computing needs. The desktops themselves are correspondingly grouped together in desktop pools that may be provisioned, managed, and deleted as single entities. In the VDI, each desktop is exported to the user from a virtual machine (VM) that is assigned to the user. The desktop pools are associated with resources in the datacenter, including, but not limited to, compute resources, memory, network, and storage.
When a VM is first created, the VM is assigned an area of storage from pools of available storage. Known shared storage may be provided from sources such as locally-attached storage, a storage area network (SAN), network-attached storage (NAS), and other similar systems. In some known methods of storage allocation, a VM is assigned a fixed amount of storage, and this storage is dedicated to the VM. However, such methods often waste storage due to over-allocation. For example, a VM may be created with 20 Gigabytes (GB) of storage from a storage pool, but may only store 5 GB of data, leaving 15 GB of storage that is unused. Moreover, this unused storage may never be used, as the VM may never need to grow beyond 5 GB.
To avoid or to substantially reduce such waste, some VMs may be created as thin-provisioned virtual machines. Thin provisioning, in the context of storage, refers to the known technique of allocating storage to a VM on demand, or at the time the storage is needed. For example, a thin-provisioned VM may be created with an upper limit of 20 GB, but a thin-provisioned storage pool will only give the VM the amount of storage it currently needs, i.e. 5 GB. In the shared storage pool, the unused 15 GB remains unallocated and available for other VM's to potentially use. Although thin provisioning of storage pools helps avoid wasting storage, this technique manifests a potential problem of over-allocation. For example, when more space is promised to a number of VMs than is available in the storage pool, the storage pool is considered “over-committed.” If all of the VMs consume all of the storage that they are promised, the storage pool may not be able to satisfy its obligations to each of the VMs. The more over-committed a storage pool becomes, the greater the risk that the storage pool may become full.
During creation of new VMs, the VDI allocates storage to the new VM from a group of potential storage areas, or datastores. The VDI may make the decision as to which datastore the VM will be assigned. However, each datastore may have several VMs already assigned to it. Some of the VMs may be thin-provisioned VMs. Further, some of the thin-provisioned VMs may have been recently created, and may not yet be consuming much space. As such, if the VDI merely considers the capacity currently being consumed from a given datastore, and compares each of the datastores based on the currently available capacity, the space required by new VMs in a given datastore may be underestimated, and may result in a single datastore being repeatedly selected for creation of new VMs regardless of recent assignments.